<%@ include file="/common/taglibs.jsp"%>
<%@ page contentType="text/html; charset=UTF-8"%>
<head>
	<c:set var="noToolBar" value="true" scope="request"/><%-- 不需要工具栏 --%>
	<title>${title}</title>
</head>

<div class="top clearfix">
	<ul class="tab">
		<li class="curr"><span>${title}</span></li>
	</ul>
</div>
<div class="modify">

<div class="tips_info" id="ltipInfoDiv">
	<a href="javascript:void(0)" onclick="$j('#ltipInfoDiv').slideUp('slow');" class="close">&nbsp;</a>
	<h4><fmt:message key="inventoryList.tipInfo.title.operation"/>:</h4>
	<p style="color:  red;"><fmt:message key="inventoryList.tipInfo.operation.explain"/></p>
</div><br/>

<form name="importForm" id="importForm">
	<table width="100%" border="0" cellspacing="0" cellpadding="0" class="com_modi_table">
		<tr>
			<td colspan="2" ><h4><fmt:message key="import.step1"/></h4></td>
		</tr>
	
		<tr>
			<td colspan="2">
				<span class="download2"></span>&nbsp;<a href="${ctxPath}/tool/import.html?doAction=downloadFile&fileUrl=${fileTemplateUrl}"><fmt:message key="import.step1.downloadTemplate"/></a>
				&nbsp;&nbsp;
				<span class="download2"></span>&nbsp;<a href="${ctxPath}/tool/import.html?doAction=downloadFile&fileUrl=${fileExampleUrl}"><fmt:message key="import.step1.downloadExample"/></a>
			</td>
		</tr>
			
		<tr>
			<td colspan="2" ><h4><fmt:message key="import.step2"/></h4></td>
		</tr>
	
		<tr>
			<td colspan="2">
				<fmt:message key="import.step2.fill" />
			</td>
		</tr>
			

		<tr>
			<td colspan="2" ><h4><fmt:message key="import.step3"/></h4></td>
		</tr>
		
		<tr>
			<th width="17%">
				<fmt:message key="import.step3.selectEncoding" />(<span class="red">*</span>): 
			</th>
			<td >
				<select name="encoding" class="selecttxt">
					<c:forEach items="${encodings}" var="encoding">
						<option value="${encoding}">${encoding}</option>
					</c:forEach>
				 </select>
			</td>
		</tr>
	
		<tr>
			<th width="17%">
				<fmt:message key="import.step3.upload" />(<span class="red">*</span>):
			</th>
			<td>
				<div id="fileNameDiv"></div>
				<div id="fileRowSize"></div>
				<input type="hidden" name="importFile" id="importFile" value=""   readonly="readonly"/>
			</td>
		</tr>
			
		
		<tr>
			<td colspan="2">
				<div class="op_table">
					<input type="button" class="preview_btn" value="" onclick="preview();"/>
					<input type="button" class="import_btn"  value="" onclick="startImport();"/>
				</div>
			</td>
		</tr>
		
	</table>
</form>	
</div>	



<div style="display:none">
	<fmt:message key="import.button.start" var="buttonImport"/>
	<fmt:message key="import.previewDialog.title" var="previewDialogTitle"/>
	<probiz:ui_dialog id="previewDialog" width="1024" height="500" title="${previewDialogTitle}" buttons="'${buttonImport}':startImport">
		<div id=previewDiv>
		</div>
	</probiz:ui_dialog>
	<probiz:plugin_upload fileInputId="importFile" uploadFileTypes="xls" uploadCategory="importFile" onSelect="checkFileName" cssClass="upload_img_3" onComplete="uploadFileCallback"/>
</div>



<script type="text/javascript"	src="${ctxPath}/scripts/probiz/imports/import.js?rs=${appConfig.rs}"></script>
<script type="text/javascript">	
$j(document).ready(function () {
	__FMTExtend = {
		import_upload_file_error:"<fmt:message key="import.upload.file.error"/>",
		import_upload_file_notEmpty:"<fmt:message key="import.upload.file.notEmpty"/>",
		import_stop_confirm:"<fmt:message key="import.stop.confirm"/>",
		import_restart_confirm:"<fmt:message key="import.restart.confirm"/>",
		import_newTask_confirm:"<fmt:message key="import.newTask.confirm"/>",
		import_fileRowSize_tip_1:"<fmt:message key="import.fileRowSize.tip.1"/>",
		import_fileRowSize_tip_2:"<fmt:message key="import.fileRowSize.tip.2"/>",
		import_file_download:"<fmt:message key="import.file.download"/>"
	};
	$j.extend(__FMT, __FMTExtend); 
});	
	
</script>